#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

char* createStr(char* buff, int i); 
bool checkPalindromeOdd(char* word, int length);

int main(int argc, char* argv[])
{
	int size;
	printf("How long is your string?\n");
	scanf("%d", &size);
	char word[size];
	printf("Please enter a string: \n");
	scanf("%s", word); 
	
	if(checkPalindromeOdd(word, size))
	{
		printf("Is a pallindrome.\n");
	}
	else
	{
		printf("Is not a pallindrome.\n");
	}
}

bool checkPalindromeOdd(char* word, int size)
{
	int i=0;
	int j = size -1;

	for(i=0; i<size; i++)
	{
		printf("DEBUG: compairing word[%d]: %c ", i, word[i] );
		printf("with word[%d]: %c \n", j, word[j] );
		if(word[i] != word[j])
		{
			return false;
		}
		j--;
	} 
	return true;
}
